<script type="text/ng-template" id="template-admin-all.html">
    <h3>管理员信息管理</h3>

    <div class="panel panel-default">
      <div class="panel-body">
        <div class="row">
          <div class="col-sm-3">
            <div class="input-group ">
              <input type="text" class="form-control input-sm" placeholder="用户名"  ng-model="queryStr.username">
              <span class="input-group-btn">
                <button class="btn btn-success btn-sm" type="button" ng-click="search()"><i class="fa fa-search"></i> 查询</button>
              </span>
            </div>
          </div>
          <div class="col-sm-3">
            <a href="#/admin/add" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 添加账号</a>
          </div>
        </div>
      </div>
    </div>

    <p>
      <span style="margin-left: 15px;">共 <strong>{{ all }}</strong> 条记录</span>
    </p>

    <table class="table table-hover table-bordered table-pointer">
        <thead ng-show="userList.length>0">
            <tr>
                <th>ID</th>
                <th>用户名</th>
                <th>权限类型</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="item in userList" ng-click="go('/admin/detail/'+item.id)">
                <td>{{ item.id }}</td>
                <td>{{ item.username }}</td>
                <td>
                  <span class="label" ng-class="{'label-primary': item.typecode==1, 'label-info': item.typecode==0}">{{ authorities[item.typecode].name }}
                  </span>
                </td>
            </tr>
        </tbody>
    </table>
</script>


